FROM registry.i2863.com/arm64-openjdk:22-jdk
RUN mkdir -p /web/qyhl/server/bin
RUN mkdir -p /web/qyhl/server/logs
RUN mkdir -p /web/qyhl/server/tmp
RUN echo "#!/bin/bash" >/web/qyhl/server/bin/start.sh
RUN echo '/usr/bin/java $JAVA_OPTS -Dserver.port=9559   -Dfile.encoding=UTF-8 -Duser.language=zh -Duser.timezone=GMT+08   -Djava.io.tmpdir=/web/qyhl/server/tmp   -jar /web/qyhl/server/app.jar ' >>/web/qyhl/server/bin/start.sh
RUN chmod +x /web/qyhl/server/bin/start.sh
ARG JAR_FILE
ADD target/${JAR_FILE} /web/qyhl/server/app.jar
WORKDIR  /web/qyhl/server
EXPOSE 9559
ENTRYPOINT ["/web/qyhl/server/bin/start.sh"]

